import axios from 'axios';

export function getFreightTemplatePage(params: any) {
  return axios.get('/mall/freighttemplate/page', { params });
}

export function getFreightTemplateList(): Promise<any[]> {
  return axios.get('/mall/freighttemplate/list');
}

export function addFreightTemplate(data: any) {
  return axios.post('/mall/freighttemplate', data);
}

export function updateFreightTemplate(data: any) {
  return axios.put('/mall/freighttemplate', data);
}

/**
 *  注意：这里是反单引号`
 */
export function deleteFreightTemplate(id: string) {
  return axios.delete(`/mall/freighttemplate/${id}`);
}
